<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('公文审批')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('hcy:approve:edit')}]];
    var removeFlag = [[${@permission.hasPermi('hcy:approve:remove')}]];
    var datas = [[${@dict.getType('sys_normal_disable')}]];
    var prefix = ctx + "hcy/approve";
    $(function() {
        var options = {
            url: prefix + "/list",
            removeUrl:prefix + "/remove",
            modalName: "审批",
            columns: [{
                checkbox: true
            },
                {
                    field: 'approveId',
                    title: '编号'
                },
                {
                    field: 'approveName',
                    title: '申请姓名',
                },
                {
                    field: 'approveTitle',
                    title: '申请描述',
                },
                {
                    field: 'approveStatus',
                    title: '申请状态',
                },
                {
                    field: 'approveType',
                    title: '申请类型',
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="/hcy/approve/agree?approvId='+row.approveId+'"><i class="fa fa-edit"></i>同意</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.approveId + '\')"><i class="fa fa-remove"></i>不同意</a>');
                        return actions.join('');
                    }
                }
            ]};
        $.table.init(options);
    });
</script>
</body>
</html>
